# -*- coding: utf-8 -*-

"""
Datetime: 2020/05/31
Author: Zhang Yafei
Description: 
"""
from datetime import datetime
import time


def get_cur_datetime():
    return datetime.now().strftime("%Y-%m-%d %X")

def timestamp_to_datetime(timestamp):
    local_time = datetime.utcfromtimestamp(timestamp)
    format_time = local_time.strftime("%Y-%m-%d %H:%M:%S")

    # local_time = time.localtime(timestamp)
    # format_time = time.strftime("%Y--%m--%d %H:%M:%S", local_time)

    return format_time


if __name__ == '__main__':
    get_cur_datetime()